package com.ferry.lock.engine.zookeeper.menagerie;

/**
 * Created by daiyong
 */
@Beta
public interface Serializer<T> {

	/**
	 * 序列化
	 * @param instance
	 * @return
	 */
	public byte[] serializer(T instance);

	/**
	 * 反序列化
	 * @param data
	 * @return
	 */
	public T deserializer(byte[] data);


}
